package com.ccxe.util;

/**
 * 常用静态数据
 * @author Administrator
 *
 */
public abstract class DATA {

	/**股票上午开盘时间*/
	public static final long OPENINGI_TIME1 = 930;
	public static final long OPENINGI_TIME2 = 1300;
	public static final long END_TIME1 = 1130;
	public static final long END_TIME2 = 1500;
	/**股票基准日*/
	public static final int DatumDay = 20100506;
	/**基准日长度*/
	public static final int length = 15;
	
	/**300成分股*/
	public static final int[] CS300 = new int[] { 39, 601107, 601766, 601727,
			601618, 2155, 601169, 601939, 601808, 1, 2, 9, 12, 21, 24, 27, 31,
			39, 46, 59, 60, 61, 63, 69, 89, 157, 301, 401, 402, 422, 423, 425,
			488, 527, 528, 538, 559, 562, 568, 612, 623, 625, 630, 631, 651,
			652, 667, 680, 685, 686, 690, 709, 717, 718, 728, 729, 758, 768,
			778, 780, 783, 792, 793, 800, 807, 822, 825, 839, 858, 876, 878,
			895, 897, 898, 900, 917, 927, 932, 933, 937, 951, 959, 960, 968,
			969, 983, 999, 600000, 600005, 600006, 600008, 600009, 600010,
			600011, 600016, 600019, 600028, 600033, 600036, 600037, 600058,
			600062, 600066, 600068, 600085, 600087, 600089, 600096, 600100,
			600102, 600104, 600108, 600109, 600111, 600118, 600123, 600125,
			600132, 600150, 600151, 600153, 600158, 600161, 600166, 600169,
			600170, 600176, 600177, 600183, 600188, 600196, 600208, 600210,
			600216, 600219, 600220, 600221, 600236, 600239, 600246, 600256,
			600266, 600269, 600270, 600276, 600282, 600307, 600309, 600312,
			600316, 600320, 600331, 600350, 600362, 600369, 600376, 600380,
			600383, 600395, 600415, 600418, 600428, 600456, 600500, 600508,
			600518, 600519, 600528, 600550, 600569, 600582, 600583, 600585,
			600588, 600596, 600598, 600600, 600601, 600611, 600631, 600635,
			600638, 600639, 600642, 600643, 600648, 600649, 600655, 600657,
			600660, 600663, 600664, 600674, 600675, 600685, 600688, 600690,
			600694, 600717, 600718, 600737, 600739, 600741, 600748, 600779,
			600782, 600795, 600804, 600808, 600809, 600811, 600812, 600816,
			600820, 600832, 600835, 600837, 600839, 600859, 600874, 600875,
			600879, 600881, 600886, 600895, 600026, 600426, 600595, 600597,
			600516, 600050, 600549, 600030, 600004, 600251, 600031, 600271,
			600029, 600352, 600489, 600348, 600547, 600432, 600015, 600517,
			600900, 100, 600325, 600497, 600997, 2001, 600143, 2007, 600022,
			2024, 2028, 600027, 600970, 601001, 601988, 600048, 601666, 601006,
			601111, 601699, 600018, 601588, 600017, 601398, 601872, 601991,
			601333, 601628, 601166, 601318, 2122, 338, 2128, 601998, 601328,
			601600, 601919, 601168, 2142, 601009, 601088, 601857, 601390,
			601918, 2202, 601866, 601601, 601899, 601099, 601898, 601958,
			601186, 2244, 2242, 601668 };
	/**历史开盘日期*/
	public static final int[] BEANCHMARK_DATA = new int[] { 20041231, 20050104,
			20050105, 20050106, 20050107, 20050110, 20050111, 20050112,
			20050113, 20050114, 20050117, 20050118, 20050119, 20050120,
			20050121, 20050124, 20050125, 20050126, 20050127, 20050128,
			20050131, 20050201, 20050202, 20050203, 20050204, 20050216,
			20050217, 20050218, 20050221, 20050222, 20050223, 20050224,
			20050225, 20050228, 20050301, 20050302, 20050303, 20050304,
			20050307, 20050308, 20050309, 20050310, 20050311, 20050314,
			20050315, 20050316, 20050317, 20050318, 20050321, 20050322,
			20050323, 20050324, 20050325, 20050328, 20050329, 20050330,
			20050331, 20050401, 20050404, 20050405, 20050406, 20050407,
			20050408, 20050411, 20050412, 20050413, 20050414, 20050415,
			20050418, 20050419, 20050420, 20050421, 20050422, 20050425,
			20050426, 20050427, 20050428, 20050429, 20050509, 20050510,
			20050511, 20050512, 20050513, 20050516, 20050517, 20050518,
			20050519, 20050520, 20050523, 20050524, 20050525, 20050526,
			20050527, 20050530, 20050531, 20050601, 20050602, 20050603,
			20050606, 20050607, 20050608, 20050609, 20050610, 20050613,
			20050614, 20050615, 20050616, 20050617, 20050620, 20050621,
			20050622, 20050623, 20050624, 20050627, 20050628, 20050629,
			20050630, 20050701, 20050704, 20050705, 20050706, 20050707,
			20050708, 20050711, 20050712, 20050713, 20050714, 20050715,
			20050718, 20050719, 20050720, 20050721, 20050722, 20050725,
			20050726, 20050727, 20050728, 20050729, 20050801, 20050802,
			20050803, 20050804, 20050805, 20050808, 20050809, 20050810,
			20050811, 20050812, 20050815, 20050816, 20050817, 20050818,
			20050819, 20050822, 20050823, 20050824, 20050825, 20050826,
			20050829, 20050830, 20050831, 20050901, 20050902, 20050905,
			20050906, 20050907, 20050908, 20050909, 20050912, 20050913,
			20050914, 20050915, 20050916, 20050919, 20050920, 20050921,
			20050922, 20050923, 20050926, 20050927, 20050928, 20050929,
			20050930, 20051010, 20051011, 20051012, 20051013, 20051014,
			20051017, 20051018, 20051019, 20051020, 20051021, 20051024,
			20051025, 20051026, 20051027, 20051028, 20051031, 20051101,
			20051102, 20051103, 20051104, 20051107, 20051108, 20051109,
			20051110, 20051111, 20051114, 20051115, 20051116, 20051117,
			20051118, 20051121, 20051122, 20051123, 20051124, 20051125,
			20051128, 20051129, 20051130, 20051201, 20051202, 20051205,
			20051206, 20051207, 20051208, 20051209, 20051212, 20051213,
			20051214, 20051215, 20051216, 20051219, 20051220, 20051221,
			20051222, 20051223, 20051226, 20051227, 20051228, 20051229,
			20051230, 20060104, 20060105, 20060106, 20060109, 20060110,
			20060111, 20060112, 20060113, 20060116, 20060117, 20060118,
			20060119, 20060120, 20060123, 20060124, 20060125, 20060206,
			20060207, 20060208, 20060209, 20060210, 20060213, 20060214,
			20060215, 20060216, 20060217, 20060220, 20060221, 20060222,
			20060223, 20060224, 20060227, 20060228, 20060301, 20060302,
			20060303, 20060306, 20060307, 20060308, 20060309, 20060310,
			20060313, 20060314, 20060315, 20060316, 20060317, 20060320,
			20060321, 20060322, 20060323, 20060324, 20060327, 20060328,
			20060329, 20060330, 20060331, 20060403, 20060404, 20060405,
			20060406, 20060407, 20060410, 20060411, 20060412, 20060413,
			20060414, 20060417, 20060418, 20060419, 20060420, 20060421,
			20060424, 20060425, 20060426, 20060427, 20060428, 20060508,
			20060509, 20060510, 20060511, 20060512, 20060515, 20060516,
			20060517, 20060518, 20060519, 20060522, 20060523, 20060524,
			20060525, 20060526, 20060529, 20060530, 20060531, 20060601,
			20060602, 20060605, 20060606, 20060607, 20060608, 20060609,
			20060612, 20060613, 20060614, 20060615, 20060616, 20060619,
			20060620, 20060621, 20060622, 20060623, 20060626, 20060627,
			20060628, 20060629, 20060630, 20060703, 20060704, 20060705,
			20060706, 20060707, 20060710, 20060711, 20060712, 20060713,
			20060714, 20060717, 20060718, 20060719, 20060720, 20060721,
			20060724, 20060725, 20060726, 20060727, 20060728, 20060731,
			20060801, 20060802, 20060803, 20060804, 20060807, 20060808,
			20060809, 20060810, 20060811, 20060814, 20060815, 20060816,
			20060817, 20060818, 20060821, 20060822, 20060823, 20060824,
			20060825, 20060828, 20060829, 20060830, 20060831, 20060901,
			20060904, 20060905, 20060906, 20060907, 20060908, 20060911,
			20060912, 20060913, 20060914, 20060915, 20060918, 20060919,
			20060920, 20060921, 20060922, 20060925, 20060926, 20060927,
			20060928, 20060929, 20061009, 20061010, 20061011, 20061012,
			20061013, 20061016, 20061017, 20061018, 20061019, 20061020,
			20061023, 20061024, 20061025, 20061026, 20061027, 20061030,
			20061031, 20061101, 20061102, 20061103, 20061106, 20061107,
			20061108, 20061109, 20061110, 20061113, 20061114, 20061115,
			20061116, 20061117, 20061120, 20061121, 20061122, 20061123,
			20061124, 20061127, 20061128, 20061129, 20061130, 20061201,
			20061204, 20061205, 20061206, 20061207, 20061208, 20061211,
			20061212, 20061213, 20061214, 20061215, 20061218, 20061219,
			20061220, 20061221, 20061222, 20061225, 20061226, 20061227,
			20061228, 20061229, 20070104, 20070105, 20070108, 20070109,
			20070110, 20070111, 20070112, 20070115, 20070116, 20070117,
			20070118, 20070119, 20070122, 20070123, 20070124, 20070125,
			20070126, 20070129, 20070130, 20070131, 20070201, 20070202,
			20070205, 20070206, 20070207, 20070208, 20070209, 20070212,
			20070213, 20070214, 20070215, 20070216, 20070226, 20070227,
			20070228, 20070301, 20070302, 20070305, 20070306, 20070307,
			20070308, 20070309, 20070312, 20070313, 20070314, 20070315,
			20070316, 20070319, 20070320, 20070321, 20070322, 20070323,
			20070326, 20070327, 20070328, 20070329, 20070330, 20070402,
			20070403, 20070404, 20070405, 20070406, 20070409, 20070410,
			20070411, 20070412, 20070413, 20070416, 20070417, 20070418,
			20070419, 20070420, 20070423, 20070424, 20070425, 20070426,
			20070427, 20070430, 20070508, 20070509, 20070510, 20070511,
			20070514, 20070515, 20070516, 20070517, 20070518, 20070521,
			20070522, 20070523, 20070524, 20070525, 20070528, 20070529,
			20070530, 20070531, 20070601, 20070604, 20070605, 20070606,
			20070607, 20070608, 20070611, 20070612, 20070613, 20070614,
			20070615, 20070618, 20070619, 20070620, 20070621, 20070622,
			20070625, 20070626, 20070627, 20070628, 20070629, 20070702,
			20070703, 20070704, 20070705, 20070706, 20070709, 20070710,
			20070711, 20070712, 20070713, 20070716, 20070717, 20070718,
			20070719, 20070720, 20070723, 20070724, 20070725, 20070726,
			20070727, 20070730, 20070731, 20070801, 20070802, 20070803,
			20070806, 20070807, 20070808, 20070809, 20070810, 20070813,
			20070814, 20070815, 20070816, 20070817, 20070820, 20070821,
			20070822, 20070823, 20070824, 20070827, 20070828, 20070829,
			20070830, 20070831, 20070903, 20070904, 20070905, 20070906,
			20070907, 20070910, 20070911, 20070912, 20070913, 20070914,
			20070917, 20070918, 20070919, 20070920, 20070921, 20070924,
			20070925, 20070926, 20070927, 20070928, 20071008, 20071009,
			20071010, 20071011, 20071012, 20071015, 20071016, 20071017,
			20071018, 20071019, 20071022, 20071023, 20071024, 20071025,
			20071026, 20071029, 20071030, 20071031, 20071101, 20071102,
			20071105, 20071106, 20071107, 20071108, 20071109, 20071112,
			20071113, 20071114, 20071115, 20071116, 20071119, 20071120,
			20071121, 20071122, 20071123, 20071126, 20071127, 20071128,
			20071129, 20071130, 20071203, 20071204, 20071205, 20071206,
			20071207, 20071210, 20071211, 20071212, 20071213, 20071214,
			20071217, 20071218, 20071219, 20071220, 20071221, 20071224,
			20071225, 20071226, 20071227, 20071228, 20080102, 20080103,
			20080104, 20080107, 20080108, 20080109, 20080110, 20080111,
			20080114, 20080115, 20080116, 20080117, 20080118, 20080121,
			20080122, 20080123, 20080124, 20080125, 20080128, 20080129,
			20080130, 20080131, 20080201, 20080204, 20080205, 20080213,
			20080214, 20080215, 20080218, 20080219, 20080220, 20080221,
			20080222, 20080225, 20080226, 20080227, 20080228, 20080229,
			20080303, 20080304, 20080305, 20080306, 20080307, 20080310,
			20080311, 20080312, 20080313, 20080314, 20080317, 20080318,
			20080319, 20080320, 20080321, 20080324, 20080325, 20080326,
			20080327, 20080328, 20080331, 20080401, 20080402, 20080403,
			20080407, 20080408, 20080409, 20080410, 20080411, 20080414,
			20080415, 20080416, 20080417, 20080418, 20080421, 20080422,
			20080423, 20080424, 20080425, 20080428, 20080429, 20080430,
			20080505, 20080506, 20080507, 20080508, 20080509, 20080512,
			20080513, 20080514, 20080515, 20080516, 20080519, 20080520,
			20080521, 20080522, 20080523, 20080526, 20080527, 20080528,
			20080529, 20080530, 20080602, 20080603, 20080604, 20080605,
			20080606, 20080610, 20080611, 20080612, 20080613, 20080616,
			20080617, 20080618, 20080619, 20080620, 20080623, 20080624,
			20080625, 20080626, 20080627, 20080630, 20080701, 20080702,
			20080703, 20080704, 20080707, 20080708, 20080709, 20080710,
			20080711, 20080714, 20080715, 20080716, 20080717, 20080718,
			20080721, 20080722, 20080723, 20080724, 20080725, 20080728,
			20080729, 20080730, 20080731, 20080801, 20080804, 20080805,
			20080806, 20080807, 20080808, 20080811, 20080812, 20080813,
			20080814, 20080815, 20080818, 20080819, 20080820, 20080821,
			20080822, 20080825, 20080826, 20080827, 20080828, 20080829,
			20080901, 20080902, 20080903, 20080904, 20080905, 20080908,
			20080909, 20080910, 20080911, 20080912, 20080916, 20080917,
			20080918, 20080919, 20080922, 20080923, 20080924, 20080925,
			20080926, 20081006, 20081007, 20081008, 20081009, 20081010,
			20081013, 20081014, 20081015, 20081016, 20081017, 20081020,
			20081021, 20081022, 20081023, 20081024, 20081027, 20081028,
			20081029, 20081030, 20081031, 20081103, 20081104, 20081105,
			20081106, 20081107, 20081110, 20081111, 20081112, 20081113,
			20081114, 20081117, 20081118, 20081119, 20081120, 20081121,
			20081124, 20081125, 20081126, 20081127, 20081128, 20081201,
			20081202, 20081203, 20081204, 20081205, 20081208, 20081209,
			20081210, 20081211, 20081212, 20081215, 20081216, 20081217,
			20081218, 20081219, 20081222, 20081223, 20081224, 20081225,
			20081226, 20081229, 20081230, 20081231, 20090105, 20090106,
			20090107, 20090108, 20090109, 20090112, 20090113, 20090114,
			20090115, 20090116, 20090119, 20090120, 20090121, 20090122,
			20090123, 20090202, 20090203, 20090204, 20090205, 20090206,
			20090209, 20090210, 20090211, 20090212, 20090213, 20090216,
			20090217, 20090218, 20090219, 20090220, 20090223, 20090224,
			20090225, 20090226, 20090227, 20090302, 20090303, 20090304,
			20090305, 20090306, 20090309, 20090310, 20090311, 20090312,
			20090313, 20090316, 20090317, 20090318, 20090319, 20090320,
			20090323, 20090324, 20090325, 20090326, 20090327, 20090330,
			20090331, 20090401, 20090402, 20090403, 20090407, 20090408,
			20090409, 20090410, 20090413, 20090414, 20090415, 20090416,
			20090417, 20090420, 20090421, 20090422, 20090423, 20090424,
			20090427, 20090428, 20090429, 20090430, 20090504, 20090505,
			20090506, 20090507, 20090508, 20090511, 20090512, 20090513,
			20090514, 20090515, 20090518, 20090519, 20090520, 20090521,
			20090522, 20090525, 20090526, 20090527, 20090601, 20090602,
			20090603, 20090604, 20090605, 20090608, 20090609, 20090610,
			20090611, 20090612, 20090615, 20090616, 20090617, 20090618,
			20090619, 20090622, 20090623, 20090624, 20090625, 20090626,
			20090629, 20090630, 20090701, 20090702, 20090703, 20090706,
			20090707, 20090708, 20090709, 20090710, 20090713, 20090714,
			20090715, 20090716, 20090717, 20090720, 20090721, 20090722,
			20090723, 20090724, 20090727, 20090728, 20090729, 20090730,
			20090731, 20090803, 20090804, 20090805, 20090806, 20090807,
			20090810, 20090811, 20090812, 20090813, 20090814, 20090817,
			20090818, 20090819, 20090820, 20090821, 20090824, 20090825,
			20090826, 20090827, 20090828, 20090831, 20090901, 20090902,
			20090903, 20090904, 20090907, 20090908, 20090909, 20090910,
			20090911, 20090914, 20090915, 20090916, 20090917, 20090918,
			20090921, 20090922, 20090923, 20090924, 20090925, 20090928,
			20090929, 20090930, 20091009, 20091012, 20091013, 20091014,
			20091015, 20091016, 20091019, 20091020, 20091021, 20091022,
			20091023, 20091026, 20091027, 20091028, 20091029, 20091030,
			20091102, 20091103, 20091104, 20091105, 20091106, 20091109,
			20091110, 20091111, 20091112, 20091113, 20091116, 20091117,
			20091118, 20091119, 20091120, 20091123, 20091124, 20091125,
			20091126, 20091127, 20091130, 20091201, 20091202, 20091203,
			20091204, 20091207, 20091208, 20091209, 20091210, 20091211,
			20091214, 20091215, 20091216, 20091217, 20091218, 20091221,
			20091222, 20091223, 20091224, 20091225, 20091228, 20091229,
			20091230, 20091231, 20100104, 20100105, 20100106, 20100107,
			20100108, 20100111, 20100112, 20100113, 20100114, 20100115,
			20100118, 20100119, 20100120, 20100121, 20100122, 20100125,
			20100126, 20100127, 20100128, 20100129, 20100201, 20100202,
			20100203, 20100204, 20100205, 20100208, 20100209, 20100210,
			20100211, 20100212, 20100222, 20100223, 20100224, 20100225,
			20100226, 20100301, 20100302, 20100303, 20100304, 20100305,
			20100308, 20100309, 20100310, 20100311, 20100312, 20100315,
			20100316, 20100317, 20100318, 20100319, 20100322, 20100323,
			20100324, 20100325, 20100326, 20100329, 20100330, 20100331,
			20100401, 20100402, 20100406, 20100407, 20100408, 20100409,
			20100412, 20100413, 20100414, 20100415, 20100416, 20100419,
			20100420, 20100421, 20100422, 20100423, 20100426, 20100427,
			20100428, 20100429, 20100430, 20100504, 20100505, 20100506,
			20100507, 20100510, 20100511, 20100512, 20100513, 20100514,
			20100517, 20100518, 20100519, 20100520, 20100521, 20100524,
			20100525, 20100526, 20100527, 20100528, 20100531, 20100601,
			20100602, 20100603, 20100604, 20100607, 20100608, 20100609,
			20100610, 20100611, 20100617, 20100618, 20100621, 20100622,
			20100623, 20100624, 20100625, 20100628, 20100629, 20100630 };
	//test method
	public static void main(String[] args) {
		int [] data = CS300;
		int j = 1;
		System.out.println(data.length);
		qsort_asc(data, 0, data.length - 1); 
		for (int i = 0; i < data.length; i++) {
			System.out.print(data[i]+",");
			if(i%10 == 0 && i != 0){
				System.out.println();
				System.out.println(j +"------>"+i);
				j= i+1;
			}
		}
		
	}
	
    public static void swap(int[] data, int x, int y) {   
        int temp = data[x];   
        data[x] = data[y];   
        data[y] = temp;   
    } 

    @SuppressWarnings("unused")
	private static void qsort_desc(int data[], int low, int high) {   
        int i, j, x;   
        if (low < high) { // 这个条件用来结束递归   
            i = low;   
            j = high;   
            x = data[i];   
            while (i < j) {   
                while (i < j && data[j] < x) {   
                    j--; // 从右向左找第一个小于x的数   
                }   
                if (i < j) {   
                    data[i] = data[j];   
                    i++;   
                }   
                while (i < j && data[i] > x) {   
                    i++; // 从左向右找第一个大于x的数   
                }   
                if (i < j) {   
                    data[j] = data[i];   
                    j--;   
                }   
            }   
            data[i] = x;   
            qsort_desc(data, low, i - 1);   
            qsort_desc(data, i + 1, high);   
        }   
    }   
    private static void qsort_asc(int data[], int low, int high) {   
        int i, j, x;   
        if (low < high) { // 这个条件用来结束递归   
            i = low;   
            j = high;   
            x = data[i];   
            while (i < j) {   
                while (i < j && data[j] > x) {   
                    j--; // 从右向左找第一个小于x的数   
                }   
                if (i < j) {   
                    data[i] = data[j];   
                    i++;   
                }   
                while (i < j && data[i] < x) {   
                    i++; // 从左向右找第一个大于x的数   
                }   
                if (i < j) {   
                    data[j] = data[i];   
                    j--;   
                }   
            }   
            data[i] = x;   
            qsort_asc(data, low, i - 1);   
            qsort_asc(data, i + 1, high);   
        }   
    }   
}
